// Implements the Resize OpenCV effect.
#include "../include/Resize.h"


// Class constructor. Receives the needed values for the Resize effect.
Resize::Resize(double x, double y, int interpol) : scaleFactorX(x), scaleFactorY(y), interpolationMethod(interpol){}


// Class destructor.
Resize::~Resize(void) {}


// Returns the given picture resized according to the given parameters.
void Resize::processEffect(Mat& src, Mat& dst) {
	dSize = Size(round(scaleFactorX*src.cols), (round(scaleFactorY*src.rows)));
	resize(src, dst, dSize, scaleFactorX, scaleFactorY, interpolationMethod);
}
